package com.lelouch.concurrency.example.threadLocal;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * threadLocal控制器
 *
 * @author lcy
 * @create 2018-05-23 17:35
 */
@Controller
@RequestMapping("/threadLocal")
@Slf4j
public class ThreadLocalController {

    @RequestMapping("/test")
    @ResponseBody
    public Long test(){
        log.info("控制器中的方法");
        return RequestHolder.get();
    }

}
